$(function () {
   var priority = getQueryString('priority');
   var topicId = getQueryString('topicId');

   $('#L_priority').val(priority);

   $('#update').click(function () {
       var priority =  $('#L_priority').val();
       if (priority) {
           var url = '/backstage/topic/updatePriority?topicId='+topicId+'&priority='+priority;
           $.ajax({
               url:url,
               type:'get',
               contentType:false,
               processData:false,
               cache:false,
               beforeSend: function(request){
                   request.setRequestHeader("Token",localStorage.getItem('token'));
               },
               success: function (data) {
                   console.log(data);
                   alert(data.message);
               }
           })
       }else {
           alert('输入为空')
       }

   })
});
